

<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>产品属性</title>
        <link rel="stylesheet" type="text/css" href="../css/content.css">
        <link rel="stylesheet" type="text/css" href="../css/contentblue.css">
        <link rel="stylesheet" type="text/css" href="../css/product.css">
        <link rel="stylesheet" type="text/css" href="../css/shop/product_type_prop.css">
        <script type="text/javascript" src="../js/jquery.min.js"></script>
    </head>
    <body>
        <!--内容框架开始-->
        <div class="WSY_content">
            <!--列表内容大框开始-->
            <div class="WSY_columnbox">
                <!--列表头部切换开始-->
                <div class="WSY_column_header">
                    <div class="WSY_columnnav">
                         <a href="./product_type.html" >产品分类</a>
                        <a href="./product_type_prop.html" class="white1">产品属性</a>
                    </div>
                </div><!--列表头部切换结束-->
                <div class="WSY_data">
                    <div class="classificationbox">
                        <div class="content">
                                                            <div class="conterimgbox parent_props" data-id="14">
                                    <a href="#" title="" class="icon-text">味道</a>
                                    <div class="caozuo_right">
                                        <a href="/admin/product.car_product_props/index/product_props_id/14.html" class="compile first" title="编辑"><img src="../img/operating_icon/icon05.png"/> </a>
                                         <a href="javascript:;" data-url="/admin/product.car_product_props/delete/id/14.html"  class="conter_delete two btn_delete" title="删除" data-confirm_content="子分类也会删除，你确定删除吗？"><img src="../img/operating_icon/icon04.png"/> </a>
                                        <a href="javascript:expandHide('14')" class="conter_load" title="展开">
                                            <img id="img_expand_14" data-status="hide" src="../img/dot-jiantou_x.png"> </a>
                                    </div>
                                </div>
                                
                                <div class="conterbox child_props" id="childprops_14" style="display:none">
                                                                            <div class="conterbox_text" data-child-id="15">
                                            <div class="before"></div><div style="width:140px;height:22px;overflow:hidden;float:left;">甜</div>
                                            <a class="conterbox_text_img btn_delete" href="javascript:;" data-url="/admin/product.car_product_props/delete/id/15.html">
                                                <img src="../img/operating_icon/icon04.png"/>
                                            </a>
                                        </div>
                                                                            <div class="conterbox_text" data-child-id="16">
                                            <div class="before"></div><div style="width:140px;height:22px;overflow:hidden;float:left;">辣</div>
                                            <a class="conterbox_text_img btn_delete" href="javascript:;" data-url="/admin/product.car_product_props/delete/id/16.html">
                                                <img src="../img/operating_icon/icon04.png"/>
                                            </a>
                                        </div>
                                                                    </div>

                                                            <div class="conterimgbox parent_props" data-id="17">
                                    <a href="#" title="" class="icon-text">规格1</a>
                                    <div class="caozuo_right">
                                        <a href="/admin/product.car_product_props/index/product_props_id/17.html" class="compile first" title="编辑"><img src="../img/operating_icon/icon05.png"/> </a>
                                         <a href="javascript:;" data-url="/admin/product.car_product_props/delete/id/17.html"  class="conter_delete two btn_delete" title="删除" data-confirm_content="子分类也会删除，你确定删除吗？"><img src="../img/operating_icon/icon04.png"/> </a>
                                        <a href="javascript:expandHide('17')" class="conter_load" title="展开">
                                            <img id="img_expand_17" data-status="hide" src="../img/dot-jiantou_x.png"> </a>
                                    </div>
                                </div>
                                
                                <div class="conterbox child_props" id="childprops_17" style="display:none">
                                                                            <div class="conterbox_text" data-child-id="18">
                                            <div class="before"></div><div style="width:140px;height:22px;overflow:hidden;float:left;">大</div>
                                            <a class="conterbox_text_img btn_delete" href="javascript:;" data-url="/admin/product.car_product_props/delete/id/18.html">
                                                <img src="../img/operating_icon/icon04.png"/>
                                            </a>
                                        </div>
                                                                    </div>

                                                    </div>
                        <form id="frm_pro" name="frm_pro" class="" method="post" action="/admin/product.car_product_props/add.html">
                            <div class="classify" id="classify">
                                <p class="classify_text">添加产品属性</p>                                <div style="overflow:hidden;">
                                    <p class="classify_name classify_name_text">属性名称:<input type="text" name="name" id="name" value=""></p>
                                    <p class="classify_name classify_name_text pros_name_type">关联分类:
                                        <select class="relation_type_id" name="relation_type_id">
                                            <option value='-1'>请选择分类</option>
                                            <option value='10' >衣服</option><option value='11' >鞋子</option>                                        </select>
                                    </p>
                                     <input type='hidden' name='product_props_id' value="">
                                    <div class="pro_type" style="float:left;width:200px;margin-top:15px;margin-left:100px;">
                                        <span class="pro_list" style="margin-left:30px;">属性:</span>
                                    </div>

                                    <p class="classify_name props_name classify_name_text" id="classify_name">属性列表:
                                        <input type="text" class="pro_name" name="PropertyList[]" value="">
                                        <input type="hidden" class="pro_name" name="children_props_id[]" value="">
                                        <img src="../img/operating_icon/icon45.png" class="addProps"/>
                                    </p>
                                                                         <p class="classify_name props_name second classify_name_text">
                                        <input type="text" class="pro_name" name="PropertyList[]" value="">
                                        <input type="hidden" class="pro_name" name="children_props_id[]" value="">
                                        <img src="../img/operating_icon/icon04.png" class="delProps"/>
                                    </p>
                                                                        </div>	
                                <div class="classify_content-input" style="margin-left:10%">
                                    <button type="submit" class="classify_input">保存属性</button>
                                </div>
                            </div>
                        </form>
                    </div>	        
                </div>
            </div>
        </div>
        <script type="text/javascript" src="../js/layer/layer.js"></script>
        <script type="text/javascript" src="../js/sugao.js"></script>
        <script>
            //子类展开/隐藏的方法
            function expandHide(propId) {
                var ctype = $("#childprops_" + propId);
                var img = $("#img_expand_" + propId);
                if (ctype.length > 0) {
                    if (img.data("status") == "hide") {
                        ctype.show();
                    } else {
                        ctype.hide();
                    }
                }
                if (img.data("status") == "hide") {
                    img.attr("src", "../img/dot-jiantou_s.png");
                    img.data("status", "show");
                } else {
                    img.data("status", "hide");
                    img.attr("src", "../img/dot-jiantou_x.png");
                }
            }

            $(function () {
                //删除属性
                $(".delProps").click(function () {
                    var props = $(".delProps");
                    var props_len = props.length;
                    if (props_len == 1) {
                        layer.alert("提示信息：只剩一个了，再删就没了！");
                        return;
                    }
                    $(this).parent("p").remove();
                });
                $(".addProps").click(function () {
                    var newprop = $(this).parent("p").next().clone(true);
                    newprop.find("input[type='text']").val("");
                    newprop.find("input[type='hidden']").val("");
                    newprop.insertAfter($(this).parent("p"));
                });
            });
        </script>
    </body>
</html>